#!/usr/bin/python
# Created by Jiawei
# Date Created: 2009/03/01

import cgi
import os
#import wsgiref.handlers
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import webapp
import default, blog, photo, gadgets, about, admin

ROUTES = [
    ('/*$', default.MainPage),
    ('/cover_article_handler', default.ArticleHandler),
    ('/blog', blog.BlogPage),
    ('/admin', admin.MainPage),
    ('/gadgets', gadgets.GadgetsPage),
    ('/photo', photo.PhotoPage),
    ('/about', about.AboutPage),]

def main():
    application = webapp.WSGIApplication(ROUTES, 
                                         debug = True)
    #wsgiref.handlers.CGIHandler().run(application)a
    run_wsgi_app(application)

if __name__ == "__main__":
    main()